#include <stdio.h>

int main() {
    int M, N;
    scanf("%d %d", &M, &N);

    int A[21][21];  

    for (int i = 0; i < M; i++)
        for (int j = 0; j < N; j++)
            scanf("%d", &A[i][j]);

    int found = 0; 

    for (int i = 1; i < M - 1; i++) {
        for (int j = 1; j < N - 1; j++) {
            int val = A[i][j];
            if (val > A[i-1][j] && val > A[i+1][j] &&
                val > A[i][j-1] && val > A[i][j+1]) {
                printf("%d %d %d\n", val, i + 1, j + 1); // 行列编号从1开始
                found = 1;
            }
        }
    }

    if (!found) {
        printf("None %d %d\n", M, N);
    }

    return 0;
}
